//api文件仍保留但不建议使用，推荐使用models中的api。API files remain preserved (deprecated), use models APIs instead.
import type { WechatpayTransaction, WechatpayTransactionResponse } from './types.js';

import { requestClient } from '#/api/request';

export const getuctooWechatpayTransactionList = async (page: number, pageSize: number,
  searchParams?: any) => {
  return requestClient.get<WechatpayTransactionResponse>(`/uctoo/wechatpay_transaction/${pageSize}/${page}`,{
    params: searchParams,
  });
};

export const getuctooWechatpayTransaction = async (id: string) => {
  return requestClient.get<WechatpayTransaction>(`/uctoo/wechatpay_transaction/${id}`);
};

export const adductooWechatpayTransaction = async (data: Partial<WechatpayTransaction>) => {
  return requestClient.post<WechatpayTransaction>('/uctoo/wechatpay_transaction/add', data);
};

export const edituctooWechatpayTransaction = async (data: Partial<WechatpayTransaction>) => {
  return requestClient.post<WechatpayTransaction>('/uctoo/wechatpay_transaction/edit', data);
};

export const deleteuctooWechatpayTransaction = async (id: string) => {
  return requestClient.post<any>('/uctoo/wechatpay_transaction/del', { id });
};
